import request from '@/config/axios'
import type { ReservationRefund } from './types'

export const getReservationRefundsListApi = (
  params: any
): Promise<IResponse<IResData<ReservationRefund>>> => {
  return request.get({ url: '/reservation-refund', params })
}

export const createReservationRefundsApi = (
  data: Partial<ReservationRefund>
): Promise<IResponse<ReservationRefund>> => {
  return request.post({ url: '/reservation-refund', data })
}

export const updateReservationRefundsApi = (
  id: string,
  data: Partial<ReservationRefund>
): Promise<IResponse> => {
  return request.put({ url: `/reservation-refund/id/${id}`, data })
}

export const getReservationRefundsDetailApi = (
  id: string
): Promise<IResponse<ReservationRefund>> => {
  return request.get({ url: `/reservation-refund/id/${id}` })
}
